import request from '@/utils/request'
/**查看产品列表 */
export function productsIndex () {
  return request.post('/Api/Products/index', {})
}
/**查看产品详情 */
export function productsView (params) {
  return request.post('/Api/Products/view', params)
}

/**点击购买，生成订单接口 */
export function ordersAdd (params) {
  return request.post('/Api/Orders/add', params)
}
/**生成订单成功后，发起购买 */
export function ordersPay (params) {
  return request.post('/Api/Orders/genPayOrder', params)
}
/**查看订单列表 */
export function ordersIndex (params) {
  return request.post('/Api/Orders/index', params)
}
/**删除订单 */
export function ordersDel (params) {
  return request.post('/Api/Orders/delete', params)
}
/**取消订单 */
export function ordersCancel (params) {
  return request.post('/Api/Orders/cancelOrder', params)
}

/**查看等级列表 */
export function levelsIndex (params) {
  return request.post('/Api/Levels/index', params)
}
/**查看等级详情 */
export function levelsView (params) {
  return request.post('/Api/Levels/view', params)
}
/**用户升级 */
export function upgrade (params) {
  return request.post('/Api/Users/upgrade', params)
}